\(\int \sqrt {a+b x} \sqrt {a c-b c x} (A+B x+C x^2) \, dx\) [23]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 33, antiderivative size = 221 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {a^2 \sqrt {c} \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x} \arctan \left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt {a^2 c-b^2 c x^2}} \]

[Out]

1/8*(4*A+a^2*C/b^2)*x*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)-1/3*B*(-b^2*x^2+a^2)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b
^2-1/4*C*x*(-b^2*x^2+a^2)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b^2+1/8*a^2*(4*A*b^2+C*a^2)*arctan(b*x*c^(1/2)/(-b^
2*c*x^2+a^2*c)^(1/2))*c^(1/2)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b^3/(-b^2*c*x^2+a^2*c)^(1/2)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {915, 1829, 655, 201, 223, 209} \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {a^2 \sqrt {c} \sqrt {a+b x} \left (a^2 C+4 A b^2\right ) \sqrt {a c-b c x} \arctan \left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt {a^2 c-b^2 c x^2}}+\frac {1}{8} x \sqrt {a+b x} \left (\frac {a^2 C}{b^2}+4 A\right ) \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \left (a^2-b^2 x^2\right ) \sqrt {a c-b c x}}{3 b^2}-\frac {C x \sqrt {a+b x} \left (a^2-b^2 x^2\right ) \sqrt {a c-b c x}}{4 b^2} \]

[In]

Int[Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(A + B*x + C*x^2),x]

[Out]

((4*A + (a^2*C)/b^2)*x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])/8 - (B*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(a^2 - b^2*x^2)
)/(3*b^2) - (C*x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(a^2 - b^2*x^2))/(4*b^2) + (a^2*Sqrt[c]*(4*A*b^2 + a^2*C)*Sqr
t[a + b*x]*Sqrt[a*c - b*c*x]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a^2*c - b^2*c*x^2]])/(8*b^3*Sqrt[a^2*c - b^2*c*x^2])

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 915

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :>
Dist[(d + e*x)^FracPart[m]*((f + g*x)^FracPart[m]/(d*f + e*g*x^2)^FracPart[m]), Int[(d*f + e*g*x^2)^m*(a + b*x
 + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[m - n, 0] && EqQ[e*f + d*g, 0]

Rule 1829

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Si
mp[e*x^(q - 1)*((a + b*x^2)^(p + 1)/(b*(q + 2*p + 1))), x] + Dist[1/(b*(q + 2*p + 1)), Int[(a + b*x^2)^p*Expan
dToSum[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, p}, x]
&& PolyQ[Pq, x] &&  !LeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \sqrt {a^2 c-b^2 c x^2} \left (A+B x+C x^2\right ) \, dx}{\sqrt {a^2 c-b^2 c x^2}} \\ & = -\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}-\frac {\left (\sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \left (-c \left (4 A b^2+a^2 C\right )-4 b^2 B c x\right ) \sqrt {a^2 c-b^2 c x^2} \, dx}{4 b^2 c \sqrt {a^2 c-b^2 c x^2}} \\ & = -\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {\left (\left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \sqrt {a^2 c-b^2 c x^2} \, dx}{4 b^2 \sqrt {a^2 c-b^2 c x^2}} \\ & = \frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {\left (a^2 c \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \frac {1}{\sqrt {a^2 c-b^2 c x^2}} \, dx}{8 b^2 \sqrt {a^2 c-b^2 c x^2}} \\ & = \frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {\left (a^2 c \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x}\right ) \text {Subst}\left (\int \frac {1}{1+b^2 c x^2} \, dx,x,\frac {x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^2 \sqrt {a^2 c-b^2 c x^2}} \\ & = \frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {a^2 \sqrt {c} \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x} \tan ^{-1}\left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt {a^2 c-b^2 c x^2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.56 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {\sqrt {c (a-b x)} \left (b \sqrt {a-b x} \sqrt {a+b x} \left (-a^2 (8 B+3 C x)+2 b^2 x (6 A+x (4 B+3 C x))\right )+6 a^2 \left (4 A b^2+a^2 C\right ) \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )\right )}{24 b^3 \sqrt {a-b x}} \]

[In]

Integrate[Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(A + B*x + C*x^2),x]

[Out]

(Sqrt[c*(a - b*x)]*(b*Sqrt[a - b*x]*Sqrt[a + b*x]*(-(a^2*(8*B + 3*C*x)) + 2*b^2*x*(6*A + x*(4*B + 3*C*x))) + 6
*a^2*(4*A*b^2 + a^2*C)*ArcTan[Sqrt[a + b*x]/Sqrt[a - b*x]]))/(24*b^3*Sqrt[a - b*x])

Maple [A] (verified)

Time = 1.66 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.74

method result size
risch \(\frac {\left (6 C \,b^{2} x^{3}+8 b^{2} B \,x^{2}+12 A \,b^{2} x -3 C \,a^{2} x -8 a^{2} B \right ) \sqrt {b x +a}\, \left (-b x +a \right ) c}{24 b^{2} \sqrt {-c \left (b x -a \right )}}+\frac {a^{2} \left (4 b^{2} A +C \,a^{2}\right ) \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right ) \sqrt {-\left (b x +a \right ) c \left (b x -a \right )}\, c}{8 b^{2} \sqrt {b^{2} c}\, \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) \(163\)
default \(\frac {\sqrt {b x +a}\, \sqrt {c \left (-b x +a \right )}\, \left (6 C \,b^{2} x^{3} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+12 A \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{2} b^{2} c +8 B \,b^{2} x^{2} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+3 C \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{4} c +12 A \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} x -3 C \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, a^{2} x -8 B \,a^{2} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\right )}{24 \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} \sqrt {b^{2} c}}\) \(269\)

[In]

int((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/24*(6*C*b^2*x^3+8*B*b^2*x^2+12*A*b^2*x-3*C*a^2*x-8*B*a^2)*(b*x+a)^(1/2)/b^2*(-b*x+a)/(-c*(b*x-a))^(1/2)*c+1/
8*a^2*(4*A*b^2+C*a^2)/b^2/(b^2*c)^(1/2)*arctan((b^2*c)^(1/2)*x/(-b^2*c*x^2+a^2*c)^(1/2))*(-(b*x+a)*c*(b*x-a))^
(1/2)/(b*x+a)^(1/2)/(-c*(b*x-a))^(1/2)*c

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.20 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\left [\frac {3 \, {\left (C a^{4} + 4 \, A a^{2} b^{2}\right )} \sqrt {-c} \log \left (2 \, b^{2} c x^{2} + 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {-c} x - a^{2} c\right ) + 2 \, {\left (6 \, C b^{3} x^{3} + 8 \, B b^{3} x^{2} - 8 \, B a^{2} b - 3 \, {\left (C a^{2} b - 4 \, A b^{3}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{48 \, b^{3}}, -\frac {3 \, {\left (C a^{4} + 4 \, A a^{2} b^{2}\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {c} x}{b^{2} c x^{2} - a^{2} c}\right ) - {\left (6 \, C b^{3} x^{3} + 8 \, B b^{3} x^{2} - 8 \, B a^{2} b - 3 \, {\left (C a^{2} b - 4 \, A b^{3}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{24 \, b^{3}}\right ] \]

[In]

integrate((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x, algorithm="fricas")

[Out]

[1/48*(3*(C*a^4 + 4*A*a^2*b^2)*sqrt(-c)*log(2*b^2*c*x^2 + 2*sqrt(-b*c*x + a*c)*sqrt(b*x + a)*b*sqrt(-c)*x - a^
2*c) + 2*(6*C*b^3*x^3 + 8*B*b^3*x^2 - 8*B*a^2*b - 3*(C*a^2*b - 4*A*b^3)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b
^3, -1/24*(3*(C*a^4 + 4*A*a^2*b^2)*sqrt(c)*arctan(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*b*sqrt(c)*x/(b^2*c*x^2 - a^
2*c)) - (6*C*b^3*x^3 + 8*B*b^3*x^2 - 8*B*a^2*b - 3*(C*a^2*b - 4*A*b^3)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b^
3]

Sympy [F]

\[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\int \sqrt {- c \left (- a + b x\right )} \sqrt {a + b x} \left (A + B x + C x^{2}\right )\, dx \]

[In]

integrate((C*x**2+B*x+A)*(b*x+a)**(1/2)*(-b*c*x+a*c)**(1/2),x)

[Out]

Integral(sqrt(-c*(-a + b*x))*sqrt(a + b*x)*(A + B*x + C*x**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.63 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {C a^{4} \sqrt {c} \arcsin \left (\frac {b x}{a}\right )}{8 \, b^{3}} + \frac {A a^{2} \sqrt {c} \arcsin \left (\frac {b x}{a}\right )}{2 \, b} + \frac {1}{2} \, \sqrt {-b^{2} c x^{2} + a^{2} c} A x + \frac {\sqrt {-b^{2} c x^{2} + a^{2} c} C a^{2} x}{8 \, b^{2}} - \frac {{\left (-b^{2} c x^{2} + a^{2} c\right )}^{\frac {3}{2}} C x}{4 \, b^{2} c} - \frac {{\left (-b^{2} c x^{2} + a^{2} c\right )}^{\frac {3}{2}} B}{3 \, b^{2} c} \]

[In]

integrate((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x, algorithm="maxima")

[Out]

1/8*C*a^4*sqrt(c)*arcsin(b*x/a)/b^3 + 1/2*A*a^2*sqrt(c)*arcsin(b*x/a)/b + 1/2*sqrt(-b^2*c*x^2 + a^2*c)*A*x + 1
/8*sqrt(-b^2*c*x^2 + a^2*c)*C*a^2*x/b^2 - 1/4*(-b^2*c*x^2 + a^2*c)^(3/2)*C*x/(b^2*c) - 1/3*(-b^2*c*x^2 + a^2*c
)^(3/2)*B/(b^2*c)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 527 vs. \(2 (191) = 382\).

Time = 0.43 (sec) , antiderivative size = 527, normalized size of antiderivative = 2.38 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=-\frac {24 \, {\left (\frac {2 \, a c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} A a b^{2} - 12 \, {\left (\frac {2 \, a^{2} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} {\left (b x - 2 \, a\right )}\right )} B a b - 12 \, {\left (\frac {2 \, a^{2} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} {\left (b x - 2 \, a\right )}\right )} A b^{2} + 4 \, {\left (\frac {6 \, a^{3} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left ({\left (2 \, b x - 5 \, a\right )} {\left (b x + a\right )} + 9 \, a^{2}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} C a + 4 \, {\left (\frac {6 \, a^{3} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left ({\left (2 \, b x - 5 \, a\right )} {\left (b x + a\right )} + 9 \, a^{2}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} B b - {\left (\frac {18 \, a^{4} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left (39 \, a^{3} - {\left (2 \, {\left (3 \, b x - 10 \, a\right )} {\left (b x + a\right )} + 43 \, a^{2}\right )} {\left (b x + a\right )}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} C}{24 \, b^{3}} \]

[In]

integrate((C*x^2+B*x+A)*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2),x, algorithm="giac")

[Out]

-1/24*(24*(2*a*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - sqrt(-(b*x + a)*c +
 2*a*c)*sqrt(b*x + a))*A*a*b^2 - 12*(2*a^2*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sq
rt(-c) + sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a)*(b*x - 2*a))*B*a*b - 12*(2*a^2*c*log(abs(-sqrt(b*x + a)*sqrt
(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a)*(b*x - 2*a))*A*b^2 + 4
*(6*a^3*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - ((2*b*x - 5*a)*(b*x + a) +
 9*a^2)*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*C*a + 4*(6*a^3*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*
x + a)*c + 2*a*c)))/sqrt(-c) - ((2*b*x - 5*a)*(b*x + a) + 9*a^2)*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*B*b
 - (18*a^4*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - (39*a^3 - (2*(3*b*x - 1
0*a)*(b*x + a) + 43*a^2)*(b*x + a))*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*C)/b^3

Mupad [B] (verification not implemented)

Time = 19.44 (sec) , antiderivative size = 876, normalized size of antiderivative = 3.96 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {\frac {C\,a^4\,c^8\,\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}{2\,\left (\sqrt {a+b\,x}-\sqrt {a}\right )}-\frac {C\,a^4\,c\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{15}}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{15}}-\frac {35\,C\,a^4\,c^7\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^3}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^3}+\frac {273\,C\,a^4\,c^6\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^5}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^5}-\frac {715\,C\,a^4\,c^5\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^7}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^7}+\frac {715\,C\,a^4\,c^4\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^9}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^9}-\frac {273\,C\,a^4\,c^3\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{11}}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{11}}+\frac {35\,C\,a^4\,c^2\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{13}}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{13}}}{b^3\,c^8+\frac {b^3\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{16}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{16}}+\frac {8\,b^3\,c^7\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^2}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^2}+\frac {28\,b^3\,c^6\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^4}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^4}+\frac {56\,b^3\,c^5\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^6}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^6}+\frac {70\,b^3\,c^4\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^8}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^8}+\frac {56\,b^3\,c^3\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{10}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{10}}+\frac {28\,b^3\,c^2\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{12}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{12}}+\frac {8\,b^3\,c\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{14}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{14}}}+\frac {A\,x\,\sqrt {a\,c-b\,c\,x}\,\sqrt {a+b\,x}}{2}-\frac {B\,\left (a^2-b^2\,x^2\right )\,\sqrt {a\,c-b\,c\,x}\,\sqrt {a+b\,x}}{3\,b^2}-\frac {C\,a^4\,\sqrt {c}\,\mathrm {atan}\left (\frac {\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}}{\sqrt {c}\,\left (\sqrt {a+b\,x}-\sqrt {a}\right )}\right )}{2\,b^3}-\frac {A\,a^2\,\sqrt {b}\,c^2\,\ln \left (\sqrt {-b\,c}\,\sqrt {c\,\left (a-b\,x\right )}\,\sqrt {a+b\,x}-b^{3/2}\,c\,x\right )}{2\,{\left (-b\,c\right )}^{3/2}} \]

[In]

int((a*c - b*c*x)^(1/2)*(a + b*x)^(1/2)*(A + B*x + C*x^2),x)

[Out]

((C*a^4*c^8*((a*c - b*c*x)^(1/2) - (a*c)^(1/2)))/(2*((a + b*x)^(1/2) - a^(1/2))) - (C*a^4*c*((a*c - b*c*x)^(1/
2) - (a*c)^(1/2))^15)/(2*((a + b*x)^(1/2) - a^(1/2))^15) - (35*C*a^4*c^7*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^3
)/(2*((a + b*x)^(1/2) - a^(1/2))^3) + (273*C*a^4*c^6*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^5)/(2*((a + b*x)^(1/2
) - a^(1/2))^5) - (715*C*a^4*c^5*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^7)/(2*((a + b*x)^(1/2) - a^(1/2))^7) + (7
15*C*a^4*c^4*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^9)/(2*((a + b*x)^(1/2) - a^(1/2))^9) - (273*C*a^4*c^3*((a*c -
 b*c*x)^(1/2) - (a*c)^(1/2))^11)/(2*((a + b*x)^(1/2) - a^(1/2))^11) + (35*C*a^4*c^2*((a*c - b*c*x)^(1/2) - (a*
c)^(1/2))^13)/(2*((a + b*x)^(1/2) - a^(1/2))^13))/(b^3*c^8 + (b^3*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^16)/((a
+ b*x)^(1/2) - a^(1/2))^16 + (8*b^3*c^7*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^2)/((a + b*x)^(1/2) - a^(1/2))^2 +
 (28*b^3*c^6*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^4)/((a + b*x)^(1/2) - a^(1/2))^4 + (56*b^3*c^5*((a*c - b*c*x)
^(1/2) - (a*c)^(1/2))^6)/((a + b*x)^(1/2) - a^(1/2))^6 + (70*b^3*c^4*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^8)/((
a + b*x)^(1/2) - a^(1/2))^8 + (56*b^3*c^3*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^10)/((a + b*x)^(1/2) - a^(1/2))^
10 + (28*b^3*c^2*((a*c - b*c*x)^(1/2) - (a*c)^(1/2))^12)/((a + b*x)^(1/2) - a^(1/2))^12 + (8*b^3*c*((a*c - b*c
*x)^(1/2) - (a*c)^(1/2))^14)/((a + b*x)^(1/2) - a^(1/2))^14) + (A*x*(a*c - b*c*x)^(1/2)*(a + b*x)^(1/2))/2 - (
B*(a^2 - b^2*x^2)*(a*c - b*c*x)^(1/2)*(a + b*x)^(1/2))/(3*b^2) - (C*a^4*c^(1/2)*atan(((a*c - b*c*x)^(1/2) - (a
*c)^(1/2))/(c^(1/2)*((a + b*x)^(1/2) - a^(1/2)))))/(2*b^3) - (A*a^2*b^(1/2)*c^2*log((-b*c)^(1/2)*(c*(a - b*x))
^(1/2)*(a + b*x)^(1/2) - b^(3/2)*c*x))/(2*(-b*c)^(3/2))